package com.sequoaidb

/**
 * Created by gaoshengjie on 2015/5/14.
 */
object Utils {
  def validateArgs(params:Map[String,String]): Unit ={
    if(params.get("brokers").isEmpty){
      println("please input the param of brokers")
      sys.exit(-1)
    }
    if(params.get("topics").isEmpty){
      println("please input the param of topics")
      sys.exit(-1)
    }
    if(params.get("sdburl").isEmpty){
      println("please input the param of sdburl")
      sys.exit(-1)
    }
    if(params.get("collectionspace").isEmpty){
      println("please input the param of collectionspace")
      sys.exit(-1)
    }
    if(params.get("collection").isEmpty){
      println("please input the param of collection")
      sys.exit(-1)
    }
    if(params.get("seconds").isEmpty){
      println("please input the param of seconds")
      sys.exit(-1)
    }
  }



}
